## [1] "C:/Users/kadwolf/OneDrive - UGent/UGent-PC/Kadwolf/Documents/00_SPINCITY/05_onderzoek/03_colour_analysis/spin_city_colour_results_V1"
## [1] "spider" "predict_red" "predict_green"
## [4] "predict_blue" "sigma_red" "sigma_green"
## [7] "sigma_blue" "cor_red" "cor_green"
## [10] "cor_blue" "avg_reflectance" "sigma_reflectance"
## [1] "downloadlocatie" "photoID" "SPIDER_IMAGE" "SPIDERid"
## [5] "mv" "old_photo_name" "new_photo_name" "spider"
## [9] "remark" "spider_length" "abdomen_length" "cross_length"
## [13] "cross_width" "abdomen_area"
## [1] "spider" "spider_length" "abdomen_length" "cross_length"
## [5] "cross_width" "abdomen_area" "remark"
## [1] "spider" "predict_red" "predict_green"
## [4] "predict_blue" "sigma_red" "sigma_green"
## [7] "sigma_blue" "cor_red" "cor_green"
## [10] "cor_blue" "avg_reflectance" "sigma_reflectance"
## [13] "spider_length" "abdomen_length" "cross_length"
## [16] "cross_width" "abdomen_area" "remark"
## [1] "spider" "date" "project_year" "location"
## [5] "plotid" "U_landscape" "U_local" "urb_cat"
## [9] "sampling_period"
## [1] "spider" "predict_red" "predict_green"
## [4] "predict_blue" "sigma_red" "sigma_green"
## [7] "sigma_blue" "cor_red" "cor_green"
## [10] "cor_blue" "avg_reflectance" "sigma_reflectance"
## [13] "spider_length" "abdomen_length" "cross_length"
## [16] "cross_width" "abdomen_area" "remark"
## [19] "date" "project_year" "location"
## [22] "plotid" "U_landscape" "U_local"
## [25] "urb_cat" "sampling_period"
analysis data collected in 2022
SAMPLING INFO CONTAINS: info about two sampling periods (of importance as they bias the sampling sizes of the groups) sampling period 1: +- 8 spiders were sampled (+- 5 spider in web hub for behavioural analysis and 3 spiders in retreat, as for the combined microclimatic study) sampling period 2: +- 10 spiders were sampled to obtain female spiders that would deposit egg sacs for the common garden experiment
no medium local scale locations were measured: so only 2 urbanisation levels at local scale: LOW and HIGH at landscape scale the 3 urbanisation levels were included: LOW MEDIUM HIGH
## spc_tbl_ [625 × 26] (S3: spec_tbl_df/tbl_df/tbl/data.frame)
## $ spider : chr [1:625] "SC22COUP01" "SC22COUP02" "SC22COUP03" "SC22COUP04" ...
## $ predict_red : num [1:625] 34.7 16.8 20.2 26.6 18.3 ...
## $ predict_green : num [1:625] 27.3 15.2 18.5 23.5 17.8 ...
## $ predict_blue : num [1:625] 14 10.9 14 15.6 13.6 ...
## $ sigma_red : num [1:625] 1.33 1.3 1.17 1.57 1.2 ...
## $ sigma_green : num [1:625] 1.286 1.26 0.989 1.284 1.14 ...
## $ sigma_blue : num [1:625] 1.62 1.57 1.84 1.47 1.55 ...
## $ cor_red : num [1:625] 0.999 0.999 0.999 0.998 0.999 ...
## $ cor_green : num [1:625] 0.999 0.999 0.999 0.999 0.999 ...
## $ cor_blue : num [1:625] 0.998 0.998 0.998 0.998 0.998 ...
## $ avg_reflectance : num [1:625] 25.3 14.3 17.6 21.9 16.6 ...
## $ sigma_reflectance: num [1:625] 0.82 0.798 0.798 0.836 0.757 ...
## $ spider_length : num [1:625] 10.5 12.7 16.7 10.5 13.8 ...
## $ abdomen_length : num [1:625] 7.03 10.09 13.62 7.31 11.04 ...
## $ cross_length : num [1:625] 2.82 3.57 6.38 3.18 5.9 ...
## $ cross_width : num [1:625] 1.68 3.1 4.39 2.13 4.23 ...
## $ abdomen_area : num [1:625] 33.9 66.3 120.2 30.7 77.3 ...
## $ remark : chr [1:625] NA NA NA NA ...
## $ date : chr [1:625] "28/09/2022" "28/09/2022" "28/09/2022" "28/09/2022" ...
## $ project_year : chr [1:625] "SC22" "SC22" "SC22" "SC22" ...
## $ location : chr [1:625] "P01SR" "P01SR" "P01SR" "P01SR" ...
## $ plotid : chr [1:625] "P01" "P01" "P01" "P01" ...
## $ U_landscape : chr [1:625] "HIGH" "HIGH" "HIGH" "HIGH" ...
## $ U_local : chr [1:625] "HIGH" "HIGH" "HIGH" "HIGH" ...
## $ urb_cat : chr [1:625] "HIGHHIGH" "HIGHHIGH" "HIGHHIGH" "HIGHHIGH" ...
## $ sampling_period : chr [1:625] "period2" "period2" "period2" "period2" ...
## - attr(*, "spec")=
## .. cols(
## .. spider = col_character(),
## .. predict_red = col_double(),
## .. predict_green = col_double(),
## .. predict_blue = col_double(),
## .. sigma_red = col_double(),
## .. sigma_green = col_double(),
## .. sigma_blue = col_double(),
## .. cor_red = col_double(),
## .. cor_green = col_double(),
## .. cor_blue = col_double(),
## .. avg_reflectance = col_double(),
## .. sigma_reflectance = col_double()
## .. )
## - attr(*, "problems")=<externalptr>
## [1] "P01SG" "P01SR" "P02SG" "P02SR" "P03SG" "P03SR" "P04SG" "P04SR" "P05SG"
## [10] "P05SR" "P06SG" "P06SR" "P07SG" "P07SR" "P08SG" "P08SR" "P09SG" "P09SR"
## [19] "P10SG" "P10SR" "P11SG" "P11SR" "P12SG" "P12SR" "P13SG" "P13SR" "P14SG"
## [28] "P14SR" "P15SG" "P15SR" "P16SG" "P16SR" "P17SG" "P17SR" "P18SG" "P18SR"
## [37] "P19SG" "P19SR" "P20SG" "P20SR" "P21SG" "P21SR" "P22SG" "P22SR" "P23SG"
## [46] "P23SR" "P24SG" "P24SR" "P25SG" "P25SR" "P26SG" "P26SR" "P27SG" "P27SR"
## [1] "HIGH" "LOW" "MEDIUM"
## [1] "HIGH" "LOW"
## [1] "HIGHHIGH" "HIGHLOW" "LOWHIGH" "LOWLOW" "MEDIUMHIGH"
## [6] "MEDIUMLOW"
## Warning: package 'chron' was built under R version 4.3.2
## [1] TRUE
## [1] "period1" "period2"
## Rows: 625
## Columns: 27
## $ spider <fct> SC22COUP01, SC22COUP02, SC22COUP03, SC22COUP04, SC22…
## $ predict_red <dbl> 34.71614, 16.84413, 20.15878, 26.60387, 18.32356, 20…
## $ predict_green <dbl> 27.25207, 15.15258, 18.53625, 23.51236, 17.75895, 18…
## $ predict_blue <dbl> 14.03944, 10.87221, 13.96026, 15.61937, 13.57853, 12…
## $ sigma_red <dbl> 1.334946, 1.300878, 1.173223, 1.572239, 1.203629, 1.…
## $ sigma_green <dbl> 1.2856570, 1.2596986, 0.9888183, 1.2836398, 1.139792…
## $ sigma_blue <dbl> 1.619756, 1.567962, 1.838322, 1.474733, 1.553351, 1.…
## $ cor_red <dbl> 0.9987247, 0.9987824, 0.9990061, 0.9982303, 0.998952…
## $ cor_green <dbl> 0.9988228, 0.9988620, 0.9992953, 0.9988252, 0.999063…
## $ cor_blue <dbl> 0.9982353, 0.9983422, 0.9976904, 0.9984812, 0.998330…
## $ avg_reflectance <dbl> 25.33589, 14.28964, 17.55176, 21.91187, 16.55368, 17…
## $ sigma_reflectance <dbl> 0.8204745, 0.7984448, 0.7981674, 0.8362949, 0.757242…
## $ spider_length <dbl> 10.503, 12.735, 16.714, 10.501, 13.850, 12.557, 16.9…
## $ abdomen_length <dbl> 7.031, 10.094, 13.625, 7.313, 11.044, 10.447, 14.443…
## $ cross_length <dbl> 2.816, 3.574, 6.385, 3.183, 5.903, 4.280, 6.292, 4.2…
## $ cross_width <dbl> 1.676, 3.097, 4.387, 2.131, 4.232, 4.440, 5.881, 4.2…
## $ abdomen_area <dbl> 33.935, 66.292, 120.207, 30.731, 77.255, 72.300, 139…
## $ remark <chr> NA, NA, NA, NA, NA, NA, "CROSS WIDTH NOT CLEAR", NA,…
## $ date <date> 2022-09-28, 2022-09-28, 2022-09-28, 2022-09-28, 202…
## $ project_year <fct> SC22, SC22, SC22, SC22, SC22, SC22, SC22, SC22, SC22…
## $ location <fct> P01SR, P01SR, P01SR, P01SR, P01SR, P01SR, P01SR, P01…
## $ plotid <fct> P01, P01, P01, P01, P01, P01, P01, P01, P01, P01, P0…
## $ U_landscape <fct> HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH…
## $ U_local <fct> HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH…
## $ urb_cat <fct> HIGHHIGH, HIGHHIGH, HIGHHIGH, HIGHHIGH, HIGHHIGH, HI…
## $ sampling_period <fct> period2, period2, period2, period2, period2, period2…
## $ day <dbl> 270, 270, 270, 270, 270, 270, 270, 270, 270, 248, 24…
## [1] "cross_length" "cross_width" "remark"
## # A tibble: 5 × 27
## spider predict_red predict_green predict_blue sigma_red sigma_green sigma_blue
## <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 SC22P… 27.3 22.2 12.9 2.13 2.23 2.20
## 2 SC22P… 22.5 19.0 12.9 2.28 2.41 2.33
## 3 SC22P… 23.6 15.5 9.78 1.32 1.21 1.48
## 4 SC22P… 40.1 29.7 16.1 1.18 1.22 1.18
## 5 SC22P… 17.2 16.9 13.2 0.992 0.875 1.60
## # ℹ 20 more variables: cor_red <dbl>, cor_green <dbl>, cor_blue <dbl>,
## # avg_reflectance <dbl>, sigma_reflectance <dbl>, spider_length <dbl>,
## # abdomen_length <dbl>, cross_length <dbl>, cross_width <dbl>,
## # abdomen_area <dbl>, remark <chr>, date <date>, project_year <fct>,
## # location <fct>, plotid <fct>, U_landscape <fct>, U_local <fct>,
## # urb_cat <fct>, sampling_period <fct>, day <dbl>
## # A tibble: 5 × 27
## spider predict_red predict_green predict_blue sigma_red sigma_green sigma_blue
## <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 SC22P… 27.3 22.2 12.9 2.13 2.23 2.20
## 2 SC22P… 22.5 19.0 12.9 2.28 2.41 2.33
## 3 SC22P… 23.6 15.5 9.78 1.32 1.21 1.48
## 4 SC22P… 40.1 29.7 16.1 1.18 1.22 1.18
## 5 SC22P… 17.2 16.9 13.2 0.992 0.875 1.60
## # ℹ 20 more variables: cor_red <dbl>, cor_green <dbl>, cor_blue <dbl>,
## # avg_reflectance <dbl>, sigma_reflectance <dbl>, spider_length <dbl>,
## # abdomen_length <dbl>, cross_length <dbl>, cross_width <dbl>,
## # abdomen_area <dbl>, remark <chr>, date <date>, project_year <fct>,
## # location <fct>, plotid <fct>, U_landscape <fct>, U_local <fct>,
## # urb_cat <fct>, sampling_period <fct>, day <dbl>
in total 625 observations: in more detail
## # A tibble: 6 × 4
## # Groups: U_landscape, U_local [6]
## U_landscape U_local period1 period2
## <fct> <fct> <int> <int>
## 1 LOW LOW 81 76
## 2 LOW HIGH 76 NA
## 3 MEDIUM LOW 76 NA
## 4 MEDIUM HIGH 76 NA
## 5 HIGH LOW 79 NA
## 6 HIGH HIGH 84 77
## # A tibble: 54 × 3
## # Groups: location [54]
## location period1 period2
## <fct> <int> <int>
## 1 P01SG 8 NA
## 2 P01SR 8 9
## 3 P02SG 8 NA
## 4 P02SR 9 14
## 5 P03SG 10 NA
## 6 P03SR 8 9
## 7 P04SG 9 NA
## 8 P04SR 9 NA
## 9 P05SG 8 NA
## 10 P05SR 8 NA
## # ℹ 44 more rows
## # A tibble: 2 × 2
## sampling_period n
## <fct> <int>
## 1 period1 472
## 2 period2 153
#body size measurements first exploration then test each morphological trait via univariate mixed models filter out missing values
DUE TO THE FACT THAT WE HAVE 2 DIFFERENT SAMPLING PERIODS I will analyze them seperately datasets : data_bz_p1 datasets : data_bz_p2
some graphics to show that there is a big difference between the two
sampling periods (+ also here already visualy see that spiders collected
in 2022 are also bigger in urbanised areas than spiders from lower
urbanisation categories) there is a clear difference in the length
between both sampling periods and would also significantly bias the
sample sizes of certain urbanisation categories (namely the extreme :
lowlow and highhigh)
correlation
## Warning: package 'corrplot' was built under R version 4.3.2
for sampling period 2 hardly any relationship of the body size measurements with sampling day
!! but for sampling period 1 a strong correlation
so i split up per sampling period
##sampling period 1
always the same 3 type of visualisations are repeated
maybe better to scale the cross length to the proportion it takes of the abdomen or of the spider visualised here #### corrected crosslength - period1
## Warning: package 'ggpubr' was built under R version 4.3.2
statistics make use of glmmTMB multiple observation for each location because of strong positive correlation for the body size measurements with sampling day here i do include scaled day in statistical models
question: I found 3 different options if multiple observations per subplot are present:
random effect choice: masterthesis of Lukas and Thomas : we chose for the unique subplotid which is the same as the location (sampling location): (1|location)
an analysis proposed during speedy and used in masterthesis 2014 carabids Daan Mertens(supervised by Frederik Hendrickx and myself): we use plotid and the urbanisation levels at local/subplot scale for morphological measurements: (1|plotid/U_local)
Analysis spiders: Dahirel_et_al_2018_JAnimEcol/ eg. modA <- MCMCglmm(sSurface ~ landscape_urba + local_urba + sday, random = ~PLOT + PLOT:Site, data = data, family = “gaussian”, verbose = F, pr = TRUE, prior = prior_1b, nitt = niterations, burnin = nburnin, thin = nthin)
uses plotid and location => (1|plotid/location)
(same as in Baardsen et al 2021;“we included SiteID nested in PlotID as random effect in all models”)
I chose (for now) to use as random factor: (1|plotid/location), as fixed effect: urbanisation level at landscape scale (U_landscape) and urbanisation level at local scale (U_local), their interaction and potential interaction with scaled sampling day (sday): response variable = U_landscape * U_local * sday + (1|plotid/location)
for a certain part of the data, namely sampling period 2, location is the same as plotid, and only difference between 2 urbantisation categorie HIGHHIGH and LOWLOW so here i use as random factor (1|location), as fixed effects urb_cat and scaled sampling day (sday): response variable = urb_cat * sday (1|location)
## Warning: package 'DHARMa' was built under R version 4.3.3
## Warning: package 'glmmTMB' was built under R version 4.3.3
## Warning: package 'car' was built under R version 4.3.2
## Warning: package 'carData' was built under R version 4.3.2
## Warning: package 'emmeans' was built under R version 4.3.3
## Warning: package 'performance' was built under R version 4.3.3
## Warning: package 'effects' was built under R version 4.3.2
## Family: gaussian ( identity )
## Formula:
## spider_length ~ U_landscape + U_local + sday + U_landscape:sday +
## (1 | plotid/location)
## Data: data_bz_p1
##
## AIC BIC logLik deviance df.resid
## 1820.8 1862.3 -900.4 1800.8 457
##
## Random effects:
##
## Conditional model:
## Groups Name Variance Std.Dev.
## location:plotid (Intercept) 0.09611 0.3100
## plotid (Intercept) 0.16722 0.4089
## Residual 2.58812 1.6088
## Number of obs: 467, groups: location:plotid, 54; plotid, 27
##
## Dispersion estimate for gaussian family (sigma^2): 2.59
##
## Conditional model:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 10.7338 0.2201 48.77 < 2e-16 ***
## U_landscapeMEDIUM 0.3020 0.2866 1.05 0.292068
## U_landscapeHIGH 1.0476 0.2867 3.65 0.000259 ***
## U_localHIGH -0.3347 0.1722 -1.94 0.051909 .
## sday 0.7059 0.2246 3.14 0.001671 **
## U_landscapeMEDIUM:sday -0.3034 0.2938 -1.03 0.301715
## U_landscapeHIGH:sday 0.5191 0.3018 1.72 0.085352 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Analysis of Deviance Table (Type III Wald chisquare tests)
##
## Response: spider_length
## Chisq Df Pr(>Chisq)
## (Intercept) 2378.1307 1 < 2.2e-16 ***
## U_landscape 14.1550 2 0.0008439 ***
## U_local 3.7787 1 0.0519091 .
## sday 9.8797 1 0.0016711 **
## U_landscape:sday 8.9550 2 0.0113618 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Warning in Analyze.model(focal.predictors, mod, xlevels, default.levels, : the
## predictor sday is a one-column matrix that was converted to a vector
## Warning in Analyze.model(focal.predictors, mod, xlevels, default.levels, : the
## predictor sday is a one-column matrix that was converted to a vector
## contrast estimate SE df t.ratio p.value
## LOW - MEDIUM -0.302 0.287 457 -1.054 0.5435
## LOW - HIGH -1.048 0.287 457 -3.654 0.0008
## MEDIUM - HIGH -0.746 0.286 457 -2.603 0.0258
##
## Results are averaged over the levels of: U_local
## P value adjustment: tukey method for comparing a family of 3 estimates
## contrast estimate SE df t.ratio p.value
## LOW - HIGH 0.335 0.172 457 1.944 0.0525
##
## Results are averaged over the levels of: U_landscape
## contrast estimate SE df z.ratio p.value
## (nothing) nonEst NA NA NA NA
##
## Results are averaged over the levels of: U_landscape, U_local
## contrast estimate
## (LOW sday-5.65912905476366e-16) - (MEDIUM sday-5.65912905476366e-16) -0.302
## (LOW sday-5.65912905476366e-16) - (HIGH sday-5.65912905476366e-16) -1.048
## (MEDIUM sday-5.65912905476366e-16) - (HIGH sday-5.65912905476366e-16) -0.746
## SE df t.ratio p.value
## 0.287 457 -1.054 0.5435
## 0.287 457 -3.654 0.0008
## 0.286 457 -2.603 0.0258
##
## Results are averaged over the levels of: U_local
## P value adjustment: tukey method for comparing a family of 3 estimates
## Warning: package 'ggeffects' was built under R version 4.3.3
not sure if this is correct or appropriate:
## contrast estimate SE df t.ratio p.value
## (LOW sday-1) - (MEDIUM sday-1) -0.60540 0.412 457 -1.471 0.8684
## (LOW sday-1) - (HIGH sday-1) -0.52843 0.400 457 -1.319 0.9253
## (LOW sday-1) - LOW sday0 -0.70595 0.225 457 -3.143 0.0463
## (LOW sday-1) - MEDIUM sday0 -1.00795 0.361 457 -2.790 0.1213
## (LOW sday-1) - HIGH sday0 -1.75352 0.361 457 -4.853 0.0001
## (LOW sday-1) - LOW sday1 -1.41189 0.449 457 -3.143 0.0463
## (LOW sday-1) - MEDIUM sday1 -1.41051 0.404 457 -3.488 0.0155
## (LOW sday-1) - HIGH sday1 -2.97861 0.426 457 -6.988 <.0001
## (MEDIUM sday-1) - (HIGH sday-1) 0.07697 0.388 457 0.198 1.0000
## (MEDIUM sday-1) - LOW sday0 -0.10055 0.348 457 -0.289 1.0000
## (MEDIUM sday-1) - MEDIUM sday0 -0.40256 0.189 457 -2.126 0.4570
## (MEDIUM sday-1) - HIGH sday0 -1.14812 0.348 457 -3.304 0.0283
## (MEDIUM sday-1) - LOW sday1 -0.80649 0.416 457 -1.936 0.5887
## (MEDIUM sday-1) - MEDIUM sday1 -0.80512 0.379 457 -2.126 0.4570
## (MEDIUM sday-1) - HIGH sday1 -2.37322 0.415 457 -5.724 <.0001
## (HIGH sday-1) - LOW sday0 -0.17752 0.335 457 -0.531 0.9998
## (HIGH sday-1) - MEDIUM sday0 -0.47953 0.335 457 -1.433 0.8845
## (HIGH sday-1) - HIGH sday0 -1.22509 0.201 457 -6.087 <.0001
## (HIGH sday-1) - LOW sday1 -0.88346 0.405 457 -2.179 0.4213
## (HIGH sday-1) - MEDIUM sday1 -0.88209 0.381 457 -2.317 0.3337
## (HIGH sday-1) - HIGH sday1 -2.45019 0.403 457 -6.087 <.0001
## LOW sday0 - MEDIUM sday0 -0.30201 0.287 457 -1.054 0.9802
## LOW sday0 - HIGH sday0 -1.04758 0.287 457 -3.654 0.0087
## LOW sday0 - LOW sday1 -0.70595 0.225 457 -3.143 0.0463
## LOW sday0 - MEDIUM sday1 -0.70457 0.339 457 -2.077 0.4906
## LOW sday0 - HIGH sday1 -2.27267 0.365 457 -6.221 <.0001
## MEDIUM sday0 - HIGH sday0 -0.74557 0.286 457 -2.603 0.1880
## MEDIUM sday0 - LOW sday1 -0.40394 0.367 457 -1.101 0.9740
## MEDIUM sday0 - MEDIUM sday1 -0.40256 0.189 457 -2.126 0.4570
## MEDIUM sday0 - HIGH sday1 -1.97066 0.365 457 -5.401 <.0001
## HIGH sday0 - LOW sday1 0.34163 0.367 457 0.931 0.9911
## HIGH sday0 - MEDIUM sday1 0.34301 0.339 457 1.012 0.9847
## HIGH sday0 - HIGH sday1 -1.22509 0.201 457 -6.087 <.0001
## LOW sday1 - MEDIUM sday1 0.00138 0.409 457 0.003 1.0000
## LOW sday1 - HIGH sday1 -1.56672 0.431 457 -3.631 0.0095
## MEDIUM sday1 - HIGH sday1 -1.56810 0.408 457 -3.848 0.0043
##
## Results are averaged over the levels of: U_local
## P value adjustment: tukey method for comparing a family of 9 estimates
I think this is also a good visualisation for spider
length
I interprete this as : result: spiders become larger with sampling day. However this increase is much larger (so slope of curve different) between high landscapes and low/medium landscapes. Furthermore, there is also a marginal difference between locally high urbanised and locally low urbanised locations: spider in low urbanised subplots are bigger than spiders in highly urbanised subplots
Extra visualisation tests
## Family: gaussian ( identity )
## Formula:
## abdomen_length ~ U_landscape + U_local + sday + U_landscape:sday +
## (1 | plotid/location)
## Data: data_bz_p1
##
## AIC BIC logLik deviance df.resid
## 1768.7 1810.2 -874.3 1748.7 457
##
## Random effects:
##
## Conditional model:
## Groups Name Variance Std.Dev.
## location:plotid (Intercept) 0.09896 0.3146
## plotid (Intercept) 0.10491 0.3239
## Residual 2.32709 1.5255
## Number of obs: 467, groups: location:plotid, 54; plotid, 27
##
## Dispersion estimate for gaussian family (sigma^2): 2.33
##
## Conditional model:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 8.0093 0.1985 40.34 < 2e-16 ***
## U_landscapeMEDIUM 0.2405 0.2552 0.94 0.345998
## U_landscapeHIGH 0.7586 0.2550 2.98 0.002928 **
## U_localHIGH -0.5041 0.1660 -3.04 0.002394 **
## sday 0.7474 0.1998 3.74 0.000183 ***
## U_landscapeMEDIUM:sday -0.1569 0.2615 -0.60 0.548502
## U_landscapeHIGH:sday 0.5246 0.2682 1.96 0.050482 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Analysis of Deviance Table (Type III Wald chisquare tests)
##
## Response: abdomen_length
## Chisq Df Pr(>Chisq)
## (Intercept) 1627.5392 1 < 2.2e-16 ***
## U_landscape 9.2547 2 0.0097804 **
## U_local 9.2201 1 0.0023937 **
## sday 13.9949 1 0.0001833 ***
## U_landscape:sday 8.1759 2 0.0167733 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Warning in Analyze.model(focal.predictors, mod, xlevels, default.levels, : the
## predictor sday is a one-column matrix that was converted to a vector
## Warning in Analyze.model(focal.predictors, mod, xlevels, default.levels, : the
## predictor sday is a one-column matrix that was converted to a vector
## contrast estimate SE df t.ratio p.value
## LOW - MEDIUM -0.241 0.255 457 -0.942 0.6137
## LOW - HIGH -0.759 0.255 457 -2.975 0.0086
## MEDIUM - HIGH -0.518 0.255 457 -2.033 0.1054
##
## Results are averaged over the levels of: U_local
## P value adjustment: tukey method for comparing a family of 3 estimates
## contrast estimate SE df t.ratio p.value
## LOW - HIGH 0.504 0.166 457 3.036 0.0025
##
## Results are averaged over the levels of: U_landscape
## contrast estimate SE df z.ratio p.value
## (nothing) nonEst NA NA NA NA
##
## Results are averaged over the levels of: U_landscape, U_local
## contrast estimate
## (LOW sday-5.65912905476366e-16) - (MEDIUM sday-5.65912905476366e-16) -0.241
## (LOW sday-5.65912905476366e-16) - (HIGH sday-5.65912905476366e-16) -0.759
## (MEDIUM sday-5.65912905476366e-16) - (HIGH sday-5.65912905476366e-16) -0.518
## SE df t.ratio p.value
## 0.255 457 -0.942 0.6137
## 0.255 457 -2.975 0.0086
## 0.255 457 -2.033 0.1054
##
## Results are averaged over the levels of: U_local
## P value adjustment: tukey method for comparing a family of 3 estimates
not sure if this is correct or appropriate:
## contrast estimate SE df t.ratio p.value
## (LOW sday-1) - (MEDIUM sday-1) -0.3974 0.367 457 -1.083 0.9765
## (LOW sday-1) - (HIGH sday-1) -0.2340 0.357 457 -0.655 0.9992
## (LOW sday-1) - LOW sday0 -0.7474 0.200 457 -3.741 0.0064
## (LOW sday-1) - MEDIUM sday0 -0.9880 0.322 457 -3.066 0.0580
## (LOW sday-1) - HIGH sday0 -1.5060 0.322 457 -4.677 0.0001
## (LOW sday-1) - LOW sday1 -1.4949 0.400 457 -3.741 0.0064
## (LOW sday-1) - MEDIUM sday1 -1.5785 0.361 457 -4.379 0.0005
## (LOW sday-1) - HIGH sday1 -2.7780 0.379 457 -7.329 <.0001
## (MEDIUM sday-1) - (HIGH sday-1) 0.1634 0.346 457 0.473 0.9999
## (MEDIUM sday-1) - LOW sday0 -0.3500 0.310 457 -1.130 0.9694
## (MEDIUM sday-1) - MEDIUM sday0 -0.5906 0.169 457 -3.502 0.0148
## (MEDIUM sday-1) - HIGH sday0 -1.1086 0.309 457 -3.584 0.0111
## (MEDIUM sday-1) - LOW sday1 -1.0975 0.370 457 -2.964 0.0769
## (MEDIUM sday-1) - MEDIUM sday1 -1.1811 0.337 457 -3.502 0.0148
## (MEDIUM sday-1) - HIGH sday1 -2.3806 0.368 457 -6.464 <.0001
## (HIGH sday-1) - LOW sday0 -0.5134 0.298 457 -1.723 0.7322
## (HIGH sday-1) - MEDIUM sday0 -0.7540 0.298 457 -2.530 0.2202
## (HIGH sday-1) - HIGH sday0 -1.2720 0.179 457 -7.118 <.0001
## (HIGH sday-1) - LOW sday1 -1.2609 0.360 457 -3.498 0.0150
## (HIGH sday-1) - MEDIUM sday1 -1.3445 0.339 457 -3.966 0.0027
## (HIGH sday-1) - HIGH sday1 -2.5440 0.357 457 -7.118 <.0001
## LOW sday0 - MEDIUM sday0 -0.2405 0.255 457 -0.942 0.9904
## LOW sday0 - HIGH sday0 -0.7586 0.255 457 -2.975 0.0746
## LOW sday0 - LOW sday1 -0.7474 0.200 457 -3.741 0.0064
## LOW sday0 - MEDIUM sday1 -0.8311 0.302 457 -2.751 0.1332
## LOW sday0 - HIGH sday1 -2.0306 0.324 457 -6.264 <.0001
## MEDIUM sday0 - HIGH sday0 -0.5180 0.255 457 -2.033 0.5208
## MEDIUM sday0 - LOW sday1 -0.5069 0.326 457 -1.555 0.8284
## MEDIUM sday0 - MEDIUM sday1 -0.5906 0.169 457 -3.502 0.0148
## MEDIUM sday0 - HIGH sday1 -1.7901 0.324 457 -5.527 <.0001
## HIGH sday0 - LOW sday1 0.0111 0.326 457 0.034 1.0000
## HIGH sday0 - MEDIUM sday1 -0.0725 0.302 457 -0.240 1.0000
## HIGH sday0 - HIGH sday1 -1.2720 0.179 457 -7.118 <.0001
## LOW sday1 - MEDIUM sday1 -0.0837 0.364 457 -0.230 1.0000
## LOW sday1 - HIGH sday1 -1.2831 0.383 457 -3.354 0.0241
## MEDIUM sday1 - HIGH sday1 -1.1995 0.362 457 -3.313 0.0275
##
## Results are averaged over the levels of: U_local
## P value adjustment: tukey method for comparing a family of 9 estimates
visualisation of statistics abdomen length
result: results for abdomen length are the same as for spider length
abdomen area as a potential measure of fecundity
## Family: gaussian ( identity )
## Formula:
## abdomen_area ~ U_landscape + U_local + sday + U_landscape:sday +
## (1 | plotid/location)
## Data: data_bz_p1
##
## AIC BIC logLik deviance df.resid
## 4049.1 4090.6 -2014.6 4029.1 457
##
## Random effects:
##
## Conditional model:
## Groups Name Variance Std.Dev.
## location:plotid (Intercept) 12.1 3.478
## plotid (Intercept) 19.6 4.428
## Residual 305.3 17.472
## Number of obs: 467, groups: location:plotid, 54; plotid, 27
##
## Dispersion estimate for gaussian family (sigma^2): 305
##
## Conditional model:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 42.0922 2.3983 17.551 < 2e-16 ***
## U_landscapeMEDIUM 2.4313 3.1221 0.779 0.436140
## U_landscapeHIGH 8.7426 3.1214 2.801 0.005097 **
## U_localHIGH -5.1951 1.8840 -2.758 0.005823 **
## sday 8.3182 2.4465 3.400 0.000674 ***
## U_landscapeMEDIUM:sday -0.8135 3.2000 -0.254 0.799318
## U_landscapeHIGH:sday 6.6924 3.2865 2.036 0.041719 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Analysis of Deviance Table (Type III Wald chisquare tests)
##
## Response: abdomen_area
## Chisq Df Pr(>Chisq)
## (Intercept) 308.0437 1 < 2.2e-16 ***
## U_landscape 8.3639 2 0.0152687 *
## U_local 7.6042 1 0.0058232 **
## sday 11.5600 1 0.0006738 ***
## U_landscape:sday 7.1053 2 0.0286493 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Warning in Analyze.model(focal.predictors, mod, xlevels, default.levels, : the
## predictor sday is a one-column matrix that was converted to a vector
## Warning in Analyze.model(focal.predictors, mod, xlevels, default.levels, : the
## predictor sday is a one-column matrix that was converted to a vector
not sure if this is correct:
## contrast estimate SE df t.ratio p.value
## (LOW sday-1) - (MEDIUM sday-1) -3.245 4.48 457 -0.724 0.9984
## (LOW sday-1) - (HIGH sday-1) -2.050 4.36 457 -0.470 0.9999
## (LOW sday-1) - LOW sday0 -8.318 2.45 457 -3.400 0.0208
## (LOW sday-1) - MEDIUM sday0 -10.749 3.94 457 -2.731 0.1398
## (LOW sday-1) - HIGH sday0 -17.061 3.93 457 -4.336 0.0006
## (LOW sday-1) - LOW sday1 -16.636 4.89 457 -3.400 0.0208
## (LOW sday-1) - MEDIUM sday1 -18.254 4.40 457 -4.145 0.0013
## (LOW sday-1) - HIGH sday1 -32.071 4.64 457 -6.910 <.0001
## (MEDIUM sday-1) - (HIGH sday-1) 1.195 4.23 457 0.283 1.0000
## (MEDIUM sday-1) - LOW sday0 -5.073 3.79 457 -1.339 0.9190
## (MEDIUM sday-1) - MEDIUM sday0 -7.505 2.06 457 -3.638 0.0092
## (MEDIUM sday-1) - HIGH sday0 -13.816 3.79 457 -3.650 0.0089
## (MEDIUM sday-1) - LOW sday1 -13.392 4.54 457 -2.952 0.0796
## (MEDIUM sday-1) - MEDIUM sday1 -15.009 4.13 457 -3.638 0.0092
## (MEDIUM sday-1) - HIGH sday1 -28.827 4.52 457 -6.384 <.0001
## (HIGH sday-1) - LOW sday0 -6.268 3.64 457 -1.720 0.7341
## (HIGH sday-1) - MEDIUM sday0 -8.699 3.64 457 -2.387 0.2935
## (HIGH sday-1) - HIGH sday0 -15.011 2.19 457 -6.848 <.0001
## (HIGH sday-1) - LOW sday1 -14.586 4.42 457 -3.303 0.0284
## (HIGH sday-1) - MEDIUM sday1 -16.204 4.15 457 -3.908 0.0034
## (HIGH sday-1) - HIGH sday1 -30.021 4.38 457 -6.848 <.0001
## LOW sday0 - MEDIUM sday0 -2.431 3.12 457 -0.779 0.9974
## LOW sday0 - HIGH sday0 -8.743 3.12 457 -2.801 0.1179
## LOW sday0 - LOW sday1 -8.318 2.45 457 -3.400 0.0208
## LOW sday0 - MEDIUM sday1 -9.936 3.70 457 -2.689 0.1546
## LOW sday0 - HIGH sday1 -23.753 3.98 457 -5.973 <.0001
## MEDIUM sday0 - HIGH sday0 -6.311 3.12 457 -2.023 0.5279
## MEDIUM sday0 - LOW sday1 -5.887 4.00 457 -1.473 0.8677
## MEDIUM sday0 - MEDIUM sday1 -7.505 2.06 457 -3.638 0.0092
## MEDIUM sday0 - HIGH sday1 -21.322 3.97 457 -5.365 <.0001
## HIGH sday0 - LOW sday1 0.424 4.00 457 0.106 1.0000
## HIGH sday0 - MEDIUM sday1 -1.193 3.69 457 -0.323 1.0000
## HIGH sday0 - HIGH sday1 -15.011 2.19 457 -6.848 <.0001
## LOW sday1 - MEDIUM sday1 -1.618 4.46 457 -0.363 1.0000
## LOW sday1 - HIGH sday1 -15.435 4.70 457 -3.286 0.0299
## MEDIUM sday1 - HIGH sday1 -13.817 4.44 457 -3.113 0.0506
##
## Results are averaged over the levels of: U_local
## P value adjustment: tukey method for comparing a family of 9 estimates
result : same interpretation as for spider length and abdomen length
## # A tibble: 15 × 3
## # Groups: location [15]
## location urb_cat n
## <fct> <fct> <int>
## 1 P01SR HIGHHIGH 9
## 2 P02SR HIGHHIGH 14
## 3 P03SR HIGHHIGH 9
## 4 P08SG LOWLOW 11
## 5 P09SG LOWLOW 13
## 6 P11SR HIGHHIGH 11
## 7 P12SR HIGHHIGH 13
## 8 P16SG LOWLOW 1
## 9 P17SG LOWLOW 7
## 10 P18SG LOWLOW 11
## 11 P19SR HIGHHIGH 11
## 12 P21SR HIGHHIGH 10
## 13 P25SG LOWLOW 11
## 14 P26SG LOWLOW 7
## 15 P27SG LOWLOW 15
## # A tibble: 2 × 2
## urb_cat n
## <fct> <int>
## 1 LOWLOW 76
## 2 HIGHHIGH 77
only 1 spider sampled at P16SG in the second sample period : I remove this location as we have seen before that quite some variation exist between individuals of the same location)
####length sampled only High-high and low-low urbanisation categories
seems that spiders are bigger in more urbanised locations however a lot of variation between the different locations although urbanisation category is the same
result for abdomen area it the same as for spider length and abdomen length roughly the same results but a lot of variation between locations
indicates that cross pattern is roughly the same
because no correlation with sampling day, i left this out of the analysis we want the difference between the urbanisation categories highhigh and lowlow
multiple spider within 1 sampling location (location is here the same as plotid, only 1 sampling location per plotid) **so here i use (1|location) and urb_cat (highhigh vs lowlow) response variable = urb_cat + (1|location)
## Family: gaussian ( identity )
## Formula: spider_length ~ urb_cat + (1 | location)
## Data: data_bz_p2
##
## AIC BIC logLik deviance df.resid
## 625.0 637.1 -308.5 617.0 148
##
## Random effects:
##
## Conditional model:
## Groups Name Variance Std.Dev.
## location (Intercept) 0.4777 0.6911
## Residual 3.1003 1.7608
## Number of obs: 152, groups: location, 14
##
## Dispersion estimate for gaussian family (sigma^2): 3.1
##
## Conditional model:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 12.0272 0.3337 36.04 <2e-16 ***
## urb_catHIGHHIGH 0.7187 0.4696 1.53 0.126
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Analysis of Deviance Table (Type III Wald chisquare tests)
##
## Response: spider_length
## Chisq Df Pr(>Chisq)
## (Intercept) 1298.9939 1 <2e-16 ***
## urb_cat 2.3421 1 0.1259
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Family: gaussian ( identity )
## Formula: spider_length ~ urb_cat
## Data: data_bz_p2
##
## AIC BIC logLik deviance df.resid
## 630.8 639.9 -312.4 624.8 149
##
##
## Dispersion estimate for gaussian family (sigma^2): 3.57
##
## Conditional model:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 12.0163 0.2182 55.07 <2e-16 ***
## urb_catHIGHHIGH 0.7171 0.3066 2.34 0.0193 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Analysis of Deviance Table (Type III Wald chisquare tests)
##
## Response: spider_length
## Chisq Df Pr(>Chisq)
## (Intercept) 3032.4184 1 < 2e-16 ***
## urb_cat 5.4708 1 0.01934 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Warning: package 'MuMIn' was built under R version 4.3.3
## Model selection table
## cnd((Int)) dsp((Int)) cnd(urb_cat) random df logLik AICc delta
## modA 12.03 + + c(l) 4 -308.492 625.3 0.00
## modA_reduced 12.02 + + 3 -312.419 631.0 5.75
## weight
## modA 0.946
## modA_reduced 0.054
## Models ranked by AICc(x)
## Random terms:
## c(l): cond(1 | location)
| model_name | df | logLik | AICc | delta | weight |
|---|---|---|---|---|---|
| modA | 4 | -308.5 | 625.3 | 0.00 | 0.95 |
| modA_reduced | 3 | -312.4 | 631.0 | 5.75 | 0.05 |
## Data: data_bz_p2
## Models:
## modA_reduced: spider_length ~ urb_cat, zi=~0, disp=~1
## modA: spider_length ~ urb_cat + (1 | location), zi=~0, disp=~1
## Df AIC BIC logLik deviance Chisq Chi Df Pr(>Chisq)
## modA_reduced 3 630.84 639.91 -312.42 624.84
## modA 4 624.98 637.08 -308.49 616.98 7.8551 1 0.005068 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
result: the model comparison shows that : modA with random effect (1|location) describes better the variation. a lot of variation between sampling locations
but no difference between the urbanisation categories for spider length:
## # A tibble: 1 × 6
## contrast estimate SE df t.ratio p.value
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 LOWLOW - HIGHHIGH -0.719 0.470 148 -1.53 0.128
question: is this following analysis a correct way to identify which locations are different from each other because in the previous test you see that random factor location explains a lot of the variation in spider length
##
## Call:
## lm(formula = spider_length ~ location, data = data_bz_p2)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.923 -1.049 -0.118 1.160 4.960
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 13.877778 0.586847 23.648 < 2e-16 ***
## locationP02SR -1.135063 0.752185 -1.509 0.133579
## locationP03SR -2.133667 0.829927 -2.571 0.011202 *
## locationP08SG 0.004768 0.791304 0.006 0.995201
## locationP09SG -2.365470 0.763421 -3.099 0.002357 **
## locationP11SR -0.044232 0.791304 -0.056 0.955504
## locationP12SR -1.611855 0.763421 -2.111 0.036544 *
## locationP17SG -2.889778 0.887229 -3.257 0.001417 **
## locationP18SG -1.057051 0.791304 -1.336 0.183802
## locationP19SR -2.085051 0.791304 -2.635 0.009377 **
## locationP21SR -0.864778 0.808912 -1.069 0.286908
## locationP25SG -2.061414 0.791304 -2.605 0.010192 *
## locationP26SG -1.926349 0.887229 -2.171 0.031626 *
## locationP27SG -2.726444 0.742309 -3.673 0.000342 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.761 on 138 degrees of freedom
## Multiple R-squared: 0.2394, Adjusted R-squared: 0.1677
## F-statistic: 3.341 on 13 and 138 DF, p-value: 0.0001843
## Anova Table (Type III tests)
##
## Response: spider_length
## Sum Sq Df F value Pr(>F)
## (Intercept) 1733.33 1 559.2301 < 2.2e-16 ***
## location 134.63 13 3.3412 0.0001843 ***
## Residuals 427.73 138
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## contrast estimate SE df t.ratio p.value
## P01SR - P02SR 1.13506 0.752 138 1.509 0.9639
## P01SR - P03SR 2.13367 0.830 138 2.571 0.3689
## P01SR - P08SG -0.00477 0.791 138 -0.006 1.0000
## P01SR - P09SG 2.36547 0.763 138 3.099 0.1185
## P01SR - P11SR 0.04423 0.791 138 0.056 1.0000
## P01SR - P12SR 1.61185 0.763 138 2.111 0.6923
## P01SR - P17SG 2.88978 0.887 138 3.257 0.0781
## P01SR - P18SG 1.05705 0.791 138 1.336 0.9870
## P01SR - P19SR 2.08505 0.791 138 2.635 0.3287
## P01SR - P21SR 0.86478 0.809 138 1.069 0.9985
## P01SR - P25SG 2.06141 0.791 138 2.605 0.3471
## P01SR - P26SG 1.92635 0.887 138 2.171 0.6506
## P01SR - P27SG 2.72644 0.742 138 3.673 0.0226
## P02SR - P03SR 0.99860 0.752 138 1.328 0.9877
## P02SR - P08SG -1.13983 0.709 138 -1.607 0.9415
## P02SR - P09SG 1.23041 0.678 138 1.814 0.8659
## P02SR - P11SR -1.09083 0.709 138 -1.538 0.9581
## P02SR - P12SR 0.47679 0.678 138 0.703 1.0000
## P02SR - P17SG 1.75471 0.815 138 2.153 0.6633
## P02SR - P18SG -0.07801 0.709 138 -0.110 1.0000
## P02SR - P19SR 0.94999 0.709 138 1.339 0.9867
## P02SR - P21SR -0.27029 0.729 138 -0.371 1.0000
## P02SR - P25SG 0.92635 0.709 138 1.306 0.9894
## P02SR - P26SG 0.79129 0.815 138 0.971 0.9994
## P02SR - P27SG 1.59138 0.654 138 2.432 0.4627
## P03SR - P08SG -2.13843 0.791 138 -2.702 0.2890
## P03SR - P09SG 0.23180 0.763 138 0.304 1.0000
## P03SR - P11SR -2.08943 0.791 138 -2.640 0.3253
## P03SR - P12SR -0.52181 0.763 138 -0.684 1.0000
## P03SR - P17SG 0.75611 0.887 138 0.852 0.9999
## P03SR - P18SG -1.07662 0.791 138 -1.361 0.9847
## P03SR - P19SR -0.04862 0.791 138 -0.061 1.0000
## P03SR - P21SR -1.26889 0.809 138 -1.569 0.9512
## P03SR - P25SG -0.07225 0.791 138 -0.091 1.0000
## P03SR - P26SG -0.20732 0.887 138 -0.234 1.0000
## P03SR - P27SG 0.59278 0.742 138 0.799 0.9999
## P08SG - P09SG 2.37024 0.721 138 3.286 0.0720
## P08SG - P11SR 0.04900 0.751 138 0.065 1.0000
## P08SG - P12SR 1.61662 0.721 138 2.241 0.6003
## P08SG - P17SG 2.89455 0.851 138 3.401 0.0521
## P08SG - P18SG 1.06182 0.751 138 1.414 0.9787
## P08SG - P19SR 2.08982 0.751 138 2.784 0.2452
## P08SG - P21SR 0.86955 0.769 138 1.130 0.9973
## P08SG - P25SG 2.06618 0.751 138 2.752 0.2616
## P08SG - P26SG 1.93112 0.851 138 2.269 0.5806
## P08SG - P27SG 2.73121 0.699 138 3.908 0.0103
## P09SG - P11SR -2.32124 0.721 138 -3.218 0.0867
## P09SG - P12SR -0.75362 0.691 138 -1.091 0.9981
## P09SG - P17SG 0.52431 0.825 138 0.635 1.0000
## P09SG - P18SG -1.30842 0.721 138 -1.814 0.8660
## P09SG - P19SR -0.28042 0.721 138 -0.389 1.0000
## P09SG - P21SR -1.50069 0.741 138 -2.027 0.7483
## P09SG - P25SG -0.30406 0.721 138 -0.422 1.0000
## P09SG - P26SG -0.43912 0.825 138 -0.532 1.0000
## P09SG - P27SG 0.36097 0.667 138 0.541 1.0000
## P11SR - P12SR 1.56762 0.721 138 2.173 0.6490
## P11SR - P17SG 2.84555 0.851 138 3.343 0.0615
## P11SR - P18SG 1.01282 0.751 138 1.349 0.9858
## P11SR - P19SR 2.04082 0.751 138 2.719 0.2800
## P11SR - P21SR 0.82055 0.769 138 1.067 0.9985
## P11SR - P25SG 2.01718 0.751 138 2.687 0.2978
## P11SR - P26SG 1.88212 0.851 138 2.211 0.6222
## P11SR - P27SG 2.68221 0.699 138 3.838 0.0131
## P12SR - P17SG 1.27792 0.825 138 1.548 0.9558
## P12SR - P18SG -0.55480 0.721 138 -0.769 1.0000
## P12SR - P19SR 0.47320 0.721 138 0.656 1.0000
## P12SR - P21SR -0.74708 0.741 138 -1.009 0.9992
## P12SR - P25SG 0.44956 0.721 138 0.623 1.0000
## P12SR - P26SG 0.31449 0.825 138 0.381 1.0000
## P12SR - P27SG 1.11459 0.667 138 1.671 0.9225
## P17SG - P18SG -1.83273 0.851 138 -2.153 0.6634
## P17SG - P19SR -0.80473 0.851 138 -0.945 0.9996
## P17SG - P21SR -2.02500 0.868 138 -2.334 0.5332
## P17SG - P25SG -0.82836 0.851 138 -0.973 0.9994
## P17SG - P26SG -0.96343 0.941 138 -1.024 0.9990
## P17SG - P27SG -0.16333 0.806 138 -0.203 1.0000
## P18SG - P19SR 1.02800 0.751 138 1.369 0.9839
## P18SG - P21SR -0.19227 0.769 138 -0.250 1.0000
## P18SG - P25SG 1.00436 0.751 138 1.338 0.9868
## P18SG - P26SG 0.86930 0.851 138 1.021 0.9990
## P18SG - P27SG 1.66939 0.699 138 2.389 0.4937
## P19SR - P21SR -1.22027 0.769 138 -1.586 0.9469
## P19SR - P25SG -0.02364 0.751 138 -0.031 1.0000
## P19SR - P26SG -0.15870 0.851 138 -0.186 1.0000
## P19SR - P27SG 0.64139 0.699 138 0.918 0.9997
## P21SR - P25SG 1.19664 0.769 138 1.556 0.9542
## P21SR - P26SG 1.06157 0.868 138 1.224 0.9942
## P21SR - P27SG 1.86167 0.719 138 2.590 0.3565
## P25SG - P26SG -0.13506 0.851 138 -0.159 1.0000
## P25SG - P27SG 0.66503 0.699 138 0.952 0.9995
## P26SG - P27SG 0.80010 0.806 138 0.993 0.9993
##
## P value adjustment: tukey method for comparing a family of 14 estimates
| contrast | estimate | SE | df | t.ratio | p.value |
|---|---|---|---|---|---|
| P01SR - P17SG | 2.889778 | 0.8872288 | 138 | 3.257083 | 0.0780696 |
| P01SR - P27SG | 2.726444 | 0.7423088 | 138 | 3.672925 | 0.0226102 |
| P08SG - P09SG | 2.370238 | 0.7212461 | 138 | 3.286309 | 0.0720350 |
| P08SG - P17SG | 2.894545 | 0.8512101 | 138 | 3.400506 | 0.0520815 |
| P08SG - P27SG | 2.731212 | 0.6988607 | 138 | 3.908092 | 0.0103288 |
| P09SG - P11SR | -2.321238 | 0.7212461 | 138 | -3.218371 | 0.0867053 |
| P11SR - P17SG | 2.845546 | 0.8512101 | 138 | 3.342941 | 0.0614529 |
| P11SR - P27SG | 2.682212 | 0.6988607 | 138 | 3.837978 | 0.0131220 |
##
## Call:
## lm(formula = spider_length ~ 1, data = data_bz_p2)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.5096 -1.4161 -0.1311 1.2337 6.4144
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 12.3796 0.1565 79.09 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.93 on 151 degrees of freedom
## Model selection table
## (Intrc) loctn df logLik AICc delta weight
## lm_loc 13.88 + 15 -294.309 622.1 0.00 0.998
## lm_loc_reduced 12.38 2 -315.106 634.3 12.15 0.002
## Models ranked by AICc(x)
| model_name | df | logLik | AICc | delta | weight |
|---|---|---|---|---|---|
| lm_loc | 15 | -294.3 | 622.1 | 0.00 | 1 |
| lm_loc_reduced | 2 | -315.1 | 634.3 | 12.15 | 0 |
## Analysis of Variance Table
##
## Model 1: spider_length ~ location
## Model 2: spider_length ~ 1
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 138 427.73
## 2 151 562.36 -13 -134.63 3.3412 0.0001843 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Family: gaussian ( identity )
## Formula: abdomen_length ~ urb_cat + (1 | location)
## Data: data_bz_p2
##
## AIC BIC logLik deviance df.resid
## 612.8 624.9 -302.4 604.8 148
##
## Random effects:
##
## Conditional model:
## Groups Name Variance Std.Dev.
## location (Intercept) 0.486 0.6972
## Residual 2.844 1.6864
## Number of obs: 152, groups: location, 14
##
## Dispersion estimate for gaussian family (sigma^2): 2.84
##
## Conditional model:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 9.5201 0.3302 28.827 <2e-16 ***
## urb_catHIGHHIGH 0.4003 0.4648 0.861 0.389
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Analysis of Deviance Table (Type III Wald chisquare tests)
##
## Response: abdomen_length
## Chisq Df Pr(>Chisq)
## (Intercept) 831.0203 1 <2e-16 ***
## urb_cat 0.7417 1 0.3891
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Call:
## lm(formula = abdomen_length ~ location, data = data_bz_p2)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.9842 -0.9458 0.0630 1.0665 5.2538
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 11.0152 0.5623 19.589 < 2e-16 ***
## locationP02SR -0.7783 0.7207 -1.080 0.28210
## locationP03SR -1.8012 0.7952 -2.265 0.02507 *
## locationP08SG 0.2946 0.7582 0.389 0.69822
## locationP09SG -2.0114 0.7315 -2.750 0.00677 **
## locationP11SR 0.1550 0.7582 0.204 0.83837
## locationP12SR -2.0365 0.7315 -2.784 0.00612 **
## locationP17SG -2.4521 0.8501 -2.884 0.00455 **
## locationP18SG -0.7655 0.7582 -1.010 0.31446
## locationP19SR -1.8843 0.7582 -2.485 0.01414 *
## locationP21SR -1.2682 0.7751 -1.636 0.10408
## locationP25SG -1.7716 0.7582 -2.336 0.02091 *
## locationP26SG -1.5452 0.8501 -1.818 0.07129 .
## locationP27SG -2.2726 0.7113 -3.195 0.00173 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.687 on 138 degrees of freedom
## Multiple R-squared: 0.2332, Adjusted R-squared: 0.1609
## F-statistic: 3.228 on 13 and 138 DF, p-value: 0.0002826
## Anova Table (Type III tests)
##
## Response: abdomen_length
## Sum Sq Df F value Pr(>F)
## (Intercept) 1092.02 1 383.727 < 2.2e-16 ***
## location 119.42 13 3.228 0.0002826 ***
## Residuals 392.72 138
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## contrast estimate SE df t.ratio p.value
## P01SR - P02SR 0.7783 0.721 138 1.080 0.9983
## P01SR - P03SR 1.8012 0.795 138 2.265 0.5833
## P01SR - P08SG -0.2946 0.758 138 -0.389 1.0000
## P01SR - P09SG 2.0114 0.732 138 2.750 0.2631
## P01SR - P11SR -0.1550 0.758 138 -0.204 1.0000
## P01SR - P12SR 2.0365 0.732 138 2.784 0.2451
## P01SR - P17SG 2.4521 0.850 138 2.884 0.1974
## P01SR - P18SG 0.7655 0.758 138 1.010 0.9991
## P01SR - P19SR 1.8843 0.758 138 2.485 0.4260
## P01SR - P21SR 1.2682 0.775 138 1.636 0.9332
## P01SR - P25SG 1.7716 0.758 138 2.336 0.5314
## P01SR - P26SG 1.5452 0.850 138 1.818 0.8644
## P01SR - P27SG 2.2726 0.711 138 3.195 0.0923
## P02SR - P03SR 1.0229 0.721 138 1.419 0.9781
## P02SR - P08SG -1.0729 0.680 138 -1.578 0.9488
## P02SR - P09SG 1.2331 0.650 138 1.898 0.8242
## P02SR - P11SR -0.9333 0.680 138 -1.373 0.9835
## P02SR - P12SR 1.2582 0.650 138 1.936 0.8028
## P02SR - P17SG 1.6738 0.781 138 2.143 0.6701
## P02SR - P18SG -0.0128 0.680 138 -0.019 1.0000
## P02SR - P19SR 1.1060 0.680 138 1.627 0.9359
## P02SR - P21SR 0.4899 0.698 138 0.701 1.0000
## P02SR - P25SG 0.9933 0.680 138 1.461 0.9721
## P02SR - P26SG 0.7669 0.781 138 0.982 0.9994
## P02SR - P27SG 1.4943 0.627 138 2.384 0.4973
## P03SR - P08SG -2.0958 0.758 138 -2.764 0.2554
## P03SR - P09SG 0.2102 0.732 138 0.287 1.0000
## P03SR - P11SR -1.9562 0.758 138 -2.580 0.3631
## P03SR - P12SR 0.2353 0.732 138 0.322 1.0000
## P03SR - P17SG 0.6509 0.850 138 0.766 1.0000
## P03SR - P18SG -1.0357 0.758 138 -1.366 0.9842
## P03SR - P19SR 0.0831 0.758 138 0.110 1.0000
## P03SR - P21SR -0.5330 0.775 138 -0.688 1.0000
## P03SR - P25SG -0.0296 0.758 138 -0.039 1.0000
## P03SR - P26SG -0.2560 0.850 138 -0.301 1.0000
## P03SR - P27SG 0.4714 0.711 138 0.663 1.0000
## P08SG - P09SG 2.3060 0.691 138 3.337 0.0626
## P08SG - P11SR 0.1396 0.719 138 0.194 1.0000
## P08SG - P12SR 2.3311 0.691 138 3.373 0.0564
## P08SG - P17SG 2.7467 0.816 138 3.368 0.0573
## P08SG - P18SG 1.0601 0.719 138 1.474 0.9701
## P08SG - P19SR 2.1789 0.719 138 3.029 0.1408
## P08SG - P21SR 1.5628 0.737 138 2.120 0.6861
## P08SG - P25SG 2.0662 0.719 138 2.872 0.2027
## P08SG - P26SG 1.8398 0.816 138 2.256 0.5900
## P08SG - P27SG 2.5672 0.670 138 3.834 0.0133
## P09SG - P11SR -2.1663 0.691 138 -3.135 0.1081
## P09SG - P12SR 0.0252 0.662 138 0.038 1.0000
## P09SG - P17SG 0.4407 0.791 138 0.557 1.0000
## P09SG - P18SG -1.2459 0.691 138 -1.803 0.8712
## P09SG - P19SR -0.1271 0.691 138 -0.184 1.0000
## P09SG - P21SR -0.7432 0.710 138 -1.047 0.9988
## P09SG - P25SG -0.2398 0.691 138 -0.347 1.0000
## P09SG - P26SG -0.4662 0.791 138 -0.589 1.0000
## P09SG - P27SG 0.2612 0.639 138 0.409 1.0000
## P11SR - P12SR 2.1915 0.691 138 3.171 0.0983
## P11SR - P17SG 2.6070 0.816 138 3.196 0.0920
## P11SR - P18SG 0.9205 0.719 138 1.280 0.9912
## P11SR - P19SR 2.0393 0.719 138 2.835 0.2200
## P11SR - P21SR 1.4232 0.737 138 1.931 0.8060
## P11SR - P25SG 1.9265 0.719 138 2.678 0.3029
## P11SR - P26SG 1.7002 0.816 138 2.084 0.7104
## P11SR - P27SG 2.4276 0.670 138 3.625 0.0263
## P12SR - P17SG 0.4155 0.791 138 0.525 1.0000
## P12SR - P18SG -1.2710 0.691 138 -1.839 0.8542
## P12SR - P19SR -0.1522 0.691 138 -0.220 1.0000
## P12SR - P21SR -0.7683 0.710 138 -1.083 0.9982
## P12SR - P25SG -0.2649 0.691 138 -0.383 1.0000
## P12SR - P26SG -0.4913 0.791 138 -0.621 1.0000
## P12SR - P27SG 0.2361 0.639 138 0.369 1.0000
## P17SG - P18SG -1.6866 0.816 138 -2.068 0.7215
## P17SG - P19SR -0.5678 0.816 138 -0.696 1.0000
## P17SG - P21SR -1.1839 0.831 138 -1.424 0.9775
## P17SG - P25SG -0.6805 0.816 138 -0.834 0.9999
## P17SG - P26SG -0.9069 0.902 138 -1.006 0.9992
## P17SG - P27SG -0.1795 0.772 138 -0.232 1.0000
## P18SG - P19SR 1.1188 0.719 138 1.555 0.9542
## P18SG - P21SR 0.5027 0.737 138 0.682 1.0000
## P18SG - P25SG 1.0061 0.719 138 1.399 0.9806
## P18SG - P26SG 0.7797 0.816 138 0.956 0.9995
## P18SG - P27SG 1.5071 0.670 138 2.251 0.5937
## P19SR - P21SR -0.6161 0.737 138 -0.836 0.9999
## P19SR - P25SG -0.1127 0.719 138 -0.157 1.0000
## P19SR - P26SG -0.3391 0.816 138 -0.416 1.0000
## P19SR - P27SG 0.3883 0.670 138 0.580 1.0000
## P21SR - P25SG 0.5034 0.737 138 0.683 1.0000
## P21SR - P26SG 0.2770 0.831 138 0.333 1.0000
## P21SR - P27SG 1.0044 0.689 138 1.458 0.9725
## P25SG - P26SG -0.2264 0.816 138 -0.278 1.0000
## P25SG - P27SG 0.5010 0.670 138 0.748 1.0000
## P26SG - P27SG 0.7274 0.772 138 0.942 0.9996
##
## P value adjustment: tukey method for comparing a family of 14 estimates
| contrast | estimate | SE | df | t.ratio | p.value |
|---|---|---|---|---|---|
| P01SR - P27SG | 2.272622 | 0.7112828 | 138 | 3.195104 | 0.0922645 |
| P08SG - P09SG | 2.305972 | 0.6911005 | 138 | 3.336667 | 0.0625562 |
| P08SG - P12SR | 2.331126 | 0.6911005 | 138 | 3.373064 | 0.0563837 |
| P08SG - P17SG | 2.746675 | 0.8156324 | 138 | 3.367541 | 0.0572855 |
| P08SG - P27SG | 2.567218 | 0.6696506 | 138 | 3.833668 | 0.0133144 |
| P11SR - P12SR | 2.191489 | 0.6911005 | 138 | 3.171014 | 0.0983237 |
| P11SR - P17SG | 2.607039 | 0.8156324 | 138 | 3.196341 | 0.0919617 |
| P11SR - P27SG | 2.427582 | 0.6696506 | 138 | 3.625147 | 0.0263282 |
result: same as for spider length
in summary: first result for spider length then for abdomen length in bold the differences between the two tables | contrast | estimate | SE | df | t.ratio | p.value | |:——————|———-:|———-:|—-:|———-:|———-:| | P01SR - P17SG | 2.889778 | 0.8872288 | 138 | 3.257083 | 0.0780696 | | P01SR - P27SG | 2.726444 | 0.7423088 | 138 | 3.672925 | 0.0226102 | | P08SG - P09SG | 2.370238 | 0.7212461 | 138 | 3.286309 | 0.0720350 | | P08SG - P17SG | 2.894545 | 0.8512101 | 138 | 3.400506 | 0.0520815 | | P08SG - P27SG | 2.731212 | 0.6988607 | 138 | 3.908092 | 0.0103288 | | P09SG - P11SR | -2.321238 | 0.7212461 | 138 | -3.218371 | 0.0867053 | | P11SR - P17SG | 2.845546 | 0.8512101 | 138 | 3.342941 | 0.0614529 | | P11SR - P27SG | 2.682212 | 0.6988607 | 138 | 3.837978 | 0.0131220 |
| contrast | estimate | SE | df | t.ratio | p.value |
|---|---|---|---|---|---|
| P01SR - P27SG | 2.272622 | 0.7112828 | 138 | 3.195104 | 0.0922645 |
| P08SG - P09SG | 2.305972 | 0.6911005 | 138 | 3.336667 | 0.0625562 |
| P08SG - P12SR | 2.331126 | 0.6911005 | 138 | 3.373064 | 0.0563837 |
| P08SG - P17SG | 2.746675 | 0.8156324 | 138 | 3.367541 | 0.0572855 |
| P08SG - P27SG | 2.567218 | 0.6696506 | 138 | 3.833668 | 0.0133144 |
| P11SR - P12SR | 2.191489 | 0.6911005 | 138 | 3.171014 | 0.0983237 |
| P11SR - P17SG | 2.607039 | 0.8156324 | 138 | 3.196341 | 0.0919617 |
| P11SR - P27SG | 2.427582 | 0.6696506 | 138 | 3.625147 | 0.0263282 |
abdomen area as a potential measure of fecundity
## Family: gaussian ( identity )
## Formula: abdomen_area ~ urb_cat + (1 | location)
## Data: data_bz_p2
##
## AIC BIC logLik deviance df.resid
## 1402.2 1414.3 -697.1 1394.2 148
##
## Random effects:
##
## Conditional model:
## Groups Name Variance Std.Dev.
## location (Intercept) 96.06 9.801
## Residual 509.28 22.567
## Number of obs: 152, groups: location, 14
##
## Dispersion estimate for gaussian family (sigma^2): 509
##
## Conditional model:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 60.920 4.564 13.348 <2e-16 ***
## urb_catHIGHHIGH 4.861 6.426 0.756 0.449
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Analysis of Deviance Table (Type III Wald chisquare tests)
##
## Response: abdomen_area
## Chisq Df Pr(>Chisq)
## (Intercept) 178.1595 1 <2e-16 ***
## urb_cat 0.5722 1 0.4494
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Call:
## lm(formula = abdomen_area ~ location, data = data_bz_p2)
##
## Residuals:
## Min 1Q Median 3Q Max
## -53.03 -12.91 -0.44 12.37 88.58
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 83.7657 7.5231 11.134 < 2e-16 ***
## locationP02SR -15.8807 9.6427 -1.647 0.101851
## locationP03SR -28.4176 10.6393 -2.671 0.008472 **
## locationP08SG 1.5885 10.1442 0.157 0.875794
## locationP09SG -29.9503 9.7868 -3.060 0.002658 **
## locationP11SR -0.8391 10.1442 -0.083 0.934195
## locationP12SR -31.5641 9.7868 -3.225 0.001572 **
## locationP17SG -35.5747 11.3739 -3.128 0.002149 **
## locationP18SG -14.5448 10.1442 -1.434 0.153891
## locationP19SR -28.8829 10.1442 -2.847 0.005084 **
## locationP21SR -19.2827 10.3699 -1.859 0.065089 .
## locationP25SG -26.2320 10.1442 -2.586 0.010748 *
## locationP26SG -23.3042 11.3739 -2.049 0.042365 *
## locationP27SG -32.6605 9.5161 -3.432 0.000791 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 22.57 on 138 degrees of freedom
## Multiple R-squared: 0.2418, Adjusted R-squared: 0.1704
## F-statistic: 3.385 on 13 and 138 DF, p-value: 0.0001559
## Anova Table (Type III tests)
##
## Response: abdomen_area
## Sum Sq Df F value Pr(>F)
## (Intercept) 63150 1 123.9748 < 2.2e-16 ***
## location 22418 13 3.3855 0.0001559 ***
## Residuals 70294 138
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## contrast estimate SE df t.ratio p.value
## P01SR - P02SR 15.881 9.64 138 1.647 0.9300
## P01SR - P03SR 28.418 10.64 138 2.671 0.3071
## P01SR - P08SG -1.589 10.14 138 -0.157 1.0000
## P01SR - P09SG 29.950 9.79 138 3.060 0.1304
## P01SR - P11SR 0.839 10.14 138 0.083 1.0000
## P01SR - P12SR 31.564 9.79 138 3.225 0.0851
## P01SR - P17SG 35.575 11.37 138 3.128 0.1100
## P01SR - P18SG 14.545 10.14 138 1.434 0.9761
## P01SR - P19SR 28.883 10.14 138 2.847 0.2142
## P01SR - P21SR 19.283 10.37 138 1.859 0.8441
## P01SR - P25SG 26.232 10.14 138 2.586 0.3592
## P01SR - P26SG 23.304 11.37 138 2.049 0.7339
## P01SR - P27SG 32.660 9.52 138 3.432 0.0475
## P02SR - P03SR 12.537 9.64 138 1.300 0.9898
## P02SR - P08SG -17.469 9.09 138 -1.921 0.8114
## P02SR - P09SG 14.070 8.69 138 1.619 0.9383
## P02SR - P11SR -15.042 9.09 138 -1.654 0.9278
## P02SR - P12SR 15.683 8.69 138 1.804 0.8706
## P02SR - P17SG 19.694 10.45 138 1.885 0.8310
## P02SR - P18SG -1.336 9.09 138 -0.147 1.0000
## P02SR - P19SR 13.002 9.09 138 1.430 0.9767
## P02SR - P21SR 3.402 9.34 138 0.364 1.0000
## P02SR - P25SG 10.351 9.09 138 1.138 0.9971
## P02SR - P26SG 7.423 10.45 138 0.711 1.0000
## P02SR - P27SG 16.780 8.39 138 2.001 0.7646
## P03SR - P08SG -30.006 10.14 138 -2.958 0.1669
## P03SR - P09SG 1.533 9.79 138 0.157 1.0000
## P03SR - P11SR -27.578 10.14 138 -2.719 0.2800
## P03SR - P12SR 3.147 9.79 138 0.322 1.0000
## P03SR - P17SG 7.157 11.37 138 0.629 1.0000
## P03SR - P18SG -13.873 10.14 138 -1.368 0.9841
## P03SR - P19SR 0.465 10.14 138 0.046 1.0000
## P03SR - P21SR -9.135 10.37 138 -0.881 0.9998
## P03SR - P25SG -2.186 10.14 138 -0.215 1.0000
## P03SR - P26SG -5.113 11.37 138 -0.450 1.0000
## P03SR - P27SG 4.243 9.52 138 0.446 1.0000
## P08SG - P09SG 31.539 9.25 138 3.411 0.0505
## P08SG - P11SR 2.428 9.62 138 0.252 1.0000
## P08SG - P12SR 33.153 9.25 138 3.586 0.0298
## P08SG - P17SG 37.163 10.91 138 3.406 0.0513
## P08SG - P18SG 16.133 9.62 138 1.676 0.9207
## P08SG - P19SR 30.471 9.62 138 3.166 0.0995
## P08SG - P21SR 20.871 9.86 138 2.116 0.6888
## P08SG - P25SG 27.821 9.62 138 2.891 0.1946
## P08SG - P26SG 24.893 10.91 138 2.281 0.5715
## P08SG - P27SG 34.249 8.96 138 3.823 0.0138
## P09SG - P11SR -29.111 9.25 138 -3.148 0.1043
## P09SG - P12SR 1.614 8.85 138 0.182 1.0000
## P09SG - P17SG 5.624 10.58 138 0.532 1.0000
## P09SG - P18SG -15.406 9.25 138 -1.666 0.9240
## P09SG - P19SR -1.067 9.25 138 -0.115 1.0000
## P09SG - P21SR -10.668 9.49 138 -1.124 0.9975
## P09SG - P25SG -3.718 9.25 138 -0.402 1.0000
## P09SG - P26SG -6.646 10.58 138 -0.628 1.0000
## P09SG - P27SG 2.710 8.55 138 0.317 1.0000
## P11SR - P12SR 30.725 9.25 138 3.323 0.0650
## P11SR - P17SG 34.736 10.91 138 3.183 0.0952
## P11SR - P18SG 13.706 9.62 138 1.424 0.9775
## P11SR - P19SR 28.044 9.62 138 2.914 0.1846
## P11SR - P21SR 18.444 9.86 138 1.870 0.8386
## P11SR - P25SG 25.393 9.62 138 2.639 0.3265
## P11SR - P26SG 22.465 10.91 138 2.059 0.7275
## P11SR - P27SG 31.821 8.96 138 3.552 0.0331
## P12SR - P17SG 4.011 10.58 138 0.379 1.0000
## P12SR - P18SG -17.019 9.25 138 -1.841 0.8534
## P12SR - P19SR -2.681 9.25 138 -0.290 1.0000
## P12SR - P21SR -12.281 9.49 138 -1.294 0.9903
## P12SR - P25SG -5.332 9.25 138 -0.577 1.0000
## P12SR - P26SG -8.260 10.58 138 -0.781 0.9999
## P12SR - P27SG 1.096 8.55 138 0.128 1.0000
## P17SG - P18SG -21.030 10.91 138 -1.927 0.8080
## P17SG - P19SR -6.692 10.91 138 -0.613 1.0000
## P17SG - P21SR -16.292 11.12 138 -1.465 0.9715
## P17SG - P25SG -9.343 10.91 138 -0.856 0.9999
## P17SG - P26SG -12.270 12.06 138 -1.017 0.9991
## P17SG - P27SG -2.914 10.33 138 -0.282 1.0000
## P18SG - P19SR 14.338 9.62 138 1.490 0.9674
## P18SG - P21SR 4.738 9.86 138 0.480 1.0000
## P18SG - P25SG 11.687 9.62 138 1.214 0.9946
## P18SG - P26SG 8.759 10.91 138 0.803 0.9999
## P18SG - P27SG 18.116 8.96 138 2.022 0.7512
## P19SR - P21SR -9.600 9.86 138 -0.974 0.9994
## P19SR - P25SG -2.651 9.62 138 -0.275 1.0000
## P19SR - P26SG -5.579 10.91 138 -0.511 1.0000
## P19SR - P27SG 3.778 8.96 138 0.422 1.0000
## P21SR - P25SG 6.949 9.86 138 0.705 1.0000
## P21SR - P26SG 4.022 11.12 138 0.362 1.0000
## P21SR - P27SG 13.378 9.21 138 1.452 0.9735
## P25SG - P26SG -2.928 10.91 138 -0.268 1.0000
## P25SG - P27SG 6.428 8.96 138 0.718 1.0000
## P26SG - P27SG 9.356 10.33 138 0.906 0.9997
##
## P value adjustment: tukey method for comparing a family of 14 estimates
| contrast | estimate | SE | df | t.ratio | p.value |
|---|---|---|---|---|---|
| P01SR - P12SR | 31.56405 | 9.786760 | 138 | 3.225179 | 0.0851320 |
| P01SR - P27SG | 32.66047 | 9.516106 | 138 | 3.432125 | 0.0474777 |
| P08SG - P09SG | 31.53880 | 9.246090 | 138 | 3.411042 | 0.0505065 |
| P08SG - P12SR | 33.15257 | 9.246090 | 138 | 3.585577 | 0.0298110 |
| P08SG - P17SG | 37.16318 | 10.912177 | 138 | 3.405661 | 0.0513056 |
| P08SG - P27SG | 34.24898 | 8.959117 | 138 | 3.822808 | 0.0138107 |
| P11SR - P12SR | 30.72493 | 9.246090 | 138 | 3.323019 | 0.0650144 |
| P11SR - P17SG | 34.73555 | 10.912177 | 138 | 3.183191 | 0.0952216 |
| P11SR - P27SG | 31.82135 | 8.959117 | 138 | 3.551839 | 0.0330974 |
all photos were redone by me with the macro and R-script of Maxime to correct the RGB values % reflectance => variable : avg_reflectance in dataset SC22_data
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 11.68 16.00 17.99 18.49 20.18 32.21
also here large differences between the first and the second sampling
period
correlation colour:
there is a negative correlation between avg_reflectance and sampling day
and there is ofcourse a positive relation between sampling period and
day
explorative graphs for the full data :
if you verify the correlation % reflectance and sampling day for the different sampling set-ups periods: so for period1 dataset and period2 dataset
visualisation of the sampling periods Immediatly shows the
differences in the datasets again
the same 3 graph visualisations per sampling period dataset for
reflectance period1 :
period2: (remark P16SG only 1 indiv)
##statistics ### full dataset SC22_data i think it is difficult to combine the data of sampling period1 and period2
i don’t think these first models: mod1, mod2 are correct. because sampling day is clearly correlated with sampling periods. and generally also spiders are darker later in the sampling season
## Family: gaussian ( identity )
## Formula:
## avg_reflectance ~ U_landscape + U_local + sday + (1 | plotid/location)
## Data: SC22_data
##
## AIC BIC logLik deviance df.resid
## 3221.8 3257.3 -1602.9 3205.8 617
##
## Random effects:
##
## Conditional model:
## Groups Name Variance Std.Dev.
## location:plotid (Intercept) 0.4793 0.6923
## plotid (Intercept) 0.7913 0.8896
## Residual 9.1891 3.0313
## Number of obs: 625, groups: location:plotid, 54; plotid, 27
##
## Dispersion estimate for gaussian family (sigma^2): 9.19
##
## Conditional model:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 18.2832 0.4197 43.56 <2e-16 ***
## U_landscapeMEDIUM 0.2147 0.5821 0.37 0.712
## U_landscapeHIGH 0.1517 0.5644 0.27 0.788
## U_localHIGH 0.1582 0.3196 0.49 0.621
## sday -1.3743 0.1593 -8.63 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Analysis of Deviance Table (Type III Wald chisquare tests)
##
## Response: avg_reflectance
## Chisq Df Pr(>Chisq)
## (Intercept) 1897.2746 1 <2e-16 ***
## U_landscape 0.1462 2 0.9295
## U_local 0.2450 1 0.6206
## sday 74.4194 1 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Warning in Analyze.model(focal.predictors, mod, xlevels, default.levels, : the
## predictor sday is a one-column matrix that was converted to a vector
## Warning in Analyze.model(focal.predictors, mod, xlevels, default.levels, : the
## predictor sday is a one-column matrix that was converted to a vector
## Warning in Analyze.model(focal.predictors, mod, xlevels, default.levels, : the
## predictor sday is a one-column matrix that was converted to a vector
## Family: gaussian ( identity )
## Formula:
## avg_reflectance ~ U_landscape * U_local + (1 | plotid/location)
## Data: SC22_data
##
## AIC BIC logLik deviance df.resid
## 3287.8 3327.7 -1634.9 3269.8 616
##
## Random effects:
##
## Conditional model:
## Groups Name Variance Std.Dev.
## location:plotid (Intercept) 0.2291 0.4787
## plotid (Intercept) 2.3492 1.5327
## Residual 10.0101 3.1639
## Number of obs: 625, groups: location:plotid, 54; plotid, 27
##
## Dispersion estimate for gaussian family (sigma^2): 10
##
## Conditional model:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 17.9302 0.5994 29.912 <2e-16 ***
## U_landscapeMEDIUM 1.0495 0.8819 1.190 0.2340
## U_landscapeHIGH 1.0241 0.8795 1.164 0.2442
## U_localHIGH 0.9287 0.5049 1.839 0.0659 .
## U_landscapeMEDIUM:U_localHIGH -0.7751 0.7548 -1.027 0.3044
## U_landscapeHIGH:U_localHIGH -1.6654 0.7066 -2.357 0.0184 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Analysis of Deviance Table (Type III Wald chisquare tests)
##
## Response: avg_reflectance
## Chisq Df Pr(>Chisq)
## (Intercept) 894.7290 1 < 2e-16 ***
## U_landscape 1.8948 2 0.38774
## U_local 3.3830 1 0.06587 .
## U_landscape:U_local 5.5685 2 0.06177 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
analysis of full dataset : try with urb_cat instead of combination of U_local and U_landscape
## Family: gaussian ( identity )
## Formula: avg_reflectance ~ urb_cat + sday + (1 | location)
## Data: SC22_data
##
## AIC BIC logLik deviance df.resid
## 3226.7 3266.7 -1604.4 3208.7 616
##
## Random effects:
##
## Conditional model:
## Groups Name Variance Std.Dev.
## location (Intercept) 1.168 1.081
## Residual 9.215 3.036
## Number of obs: 625, groups: location, 54
##
## Dispersion estimate for gaussian family (sigma^2): 9.22
##
## Conditional model:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 18.43839 0.44809 41.15 <2e-16 ***
## urb_catLOWHIGH -0.23566 0.68177 -0.35 0.730
## urb_catMEDIUMLOW 0.02765 0.67934 0.04 0.968
## urb_catMEDIUMHIGH 0.18245 0.67973 0.27 0.788
## urb_catHIGHLOW -0.24127 0.68180 -0.35 0.723
## urb_catHIGHHIGH 0.30492 0.62199 0.49 0.624
## sday -1.48317 0.15866 -9.35 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Analysis of Deviance Table (Type III Wald chisquare tests)
##
## Response: avg_reflectance
## Chisq Df Pr(>Chisq)
## (Intercept) 1693.2514 1 <2e-16 ***
## urb_cat 1.0364 5 0.9596
## sday 87.3853 1 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Warning in Analyze.model(focal.predictors, mod, xlevels, default.levels, : the
## predictor sday is a one-column matrix that was converted to a vector
## Warning in Analyze.model(focal.predictors, mod, xlevels, default.levels, : the
## predictor sday is a one-column matrix that was converted to a vector
result: spiders are darker towards the end of the the
sampling period result: no difference between
urbanisation categories
next i will focus on (i think) correcter analysis, namely the sampling periods separately
col_data_p1 contains all 27 plotid, 3 levels of U_landscape and 2 levels of U_local (no intermediate local scale sampling done in 2022)
## Family: gaussian ( identity )
## Formula:
## avg_reflectance ~ U_landscape + U_local + sday + (1 | plotid/location)
## Data: col_data_p1
##
## AIC BIC logLik deviance df.resid
## 2453.3 2486.5 -1218.6 2437.3 464
##
## Random effects:
##
## Conditional model:
## Groups Name Variance Std.Dev.
## location:plotid (Intercept) 0.7772 0.8816
## plotid (Intercept) 0.7743 0.8800
## Residual 9.2863 3.0473
## Number of obs: 472, groups: location:plotid, 54; plotid, 27
##
## Dispersion estimate for gaussian family (sigma^2): 9.29
##
## Conditional model:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 18.6113 0.4738 39.28 < 2e-16 ***
## U_landscapeMEDIUM 0.4162 0.6173 0.67 0.500
## U_landscapeHIGH 0.1664 0.6147 0.27 0.787
## U_localHIGH 0.1939 0.3709 0.52 0.601
## sday -1.5838 0.2528 -6.26 3.73e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Analysis of Deviance Table (Type III Wald chisquare tests)
##
## Response: avg_reflectance
## Chisq Df Pr(>Chisq)
## (Intercept) 1542.8455 1 < 2.2e-16 ***
## U_landscape 0.4604 2 0.7944
## U_local 0.2732 1 0.6012
## sday 39.2468 1 3.735e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Warning in Analyze.model(focal.predictors, mod, xlevels, default.levels, : the
## predictor sday is a one-column matrix that was converted to a vector
## Warning in Analyze.model(focal.predictors, mod, xlevels, default.levels, : the
## predictor sday is a one-column matrix that was converted to a vector
## Warning in Analyze.model(focal.predictors, mod, xlevels, default.levels, : the
## predictor sday is a one-column matrix that was converted to a vector
contains 7 high-high and 8 urbanisation category locations
highhigh : P01SR P02SR P03SR P11SR P12SR P19SR P21SR lowlow : P08SG
P09SG P16SG P17SG P18SG P25SG P26SG P27SG
remove P16SG from the dataset as it only contains 1 spider (also done for body size measurements) so then 7 high high locations and 7 low low locations
## Family: gaussian ( identity )
## Formula: avg_reflectance ~ urb_cat + sday + (1 | location)
## Data: col_data_p2
##
## AIC BIC logLik deviance df.resid
## 756.4 771.5 -373.2 746.4 147
##
## Random effects:
##
## Conditional model:
## Groups Name Variance Std.Dev.
## location (Intercept) 0.3732 0.6109
## Residual 7.6429 2.7646
## Number of obs: 152, groups: location, 14
##
## Dispersion estimate for gaussian family (sigma^2): 7.64
##
## Conditional model:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 17.3119 0.3976 43.54 < 2e-16 ***
## urb_catHIGHHIGH -0.1419 0.5611 -0.25 0.80035
## sday -0.7697 0.2757 -2.79 0.00524 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Analysis of Deviance Table (Type III Wald chisquare tests)
##
## Response: avg_reflectance
## Chisq Df Pr(>Chisq)
## (Intercept) 1895.4475 1 < 2.2e-16 ***
## urb_cat 0.0640 1 0.800349
## sday 7.7952 1 0.005239 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Warning in Analyze.model(focal.predictors, mod, xlevels, default.levels, : the
## predictor sday is a one-column matrix that was converted to a vector
## Warning in Analyze.model(focal.predictors, mod, xlevels, default.levels, : the
## predictor sday is a one-column matrix that was converted to a vector
result: only sampling day is significant / no
differences between the urbanisation catagories
P01SR was relatively early resampled (are the samples from the Coupure in Ghent COUP01…) I repeat the same analysis for sampling period 2 without P01SR to see if there are differences in the results
## Family: gaussian ( identity )
## Formula: avg_reflectance ~ urb_cat * sday + (1 | location)
## Data: col_data_p2_sub
##
## AIC BIC logLik deviance df.resid
## 703.4 721.2 -345.7 691.4 137
##
## Random effects:
##
## Conditional model:
## Groups Name Variance Std.Dev.
## location (Intercept) 2.079e-06 0.001442
## Residual 7.370e+00 2.714723
## Number of obs: 143, groups: location, 13
##
## Dispersion estimate for gaussian family (sigma^2): 7.37
##
## Conditional model:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 17.2252 0.3204 53.76 <2e-16 ***
## urb_catHIGHHIGH 0.0987 0.4650 0.21 0.8319
## sday -0.2579 0.3318 -0.78 0.4370
## urb_catHIGHHIGH:sday -1.1869 0.4661 -2.55 0.0109 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Analysis of Deviance Table (Type III Wald chisquare tests)
##
## Response: avg_reflectance
## Chisq Df Pr(>Chisq)
## (Intercept) 2890.6097 1 < 2e-16 ***
## urb_cat 0.0451 1 0.83190
## sday 0.6041 1 0.43701
## urb_cat:sday 6.4845 1 0.01088 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Warning in Analyze.model(focal.predictors, mod, xlevels, default.levels, : the
## predictor sday is a one-column matrix that was converted to a vector
## contrast
## (LOWLOW sday-3.68888928211885e-15) - (HIGHHIGH sday-3.68888928211885e-15)
## estimate SE df t.ratio p.value
## -0.0987 0.465 137 -0.212 0.8322
result : if P01SR removed from the second sampling period. and then verified if there are effects of urbanisation categorie (lowlow vs highhigh) and/or effects of sampling date: then we get the result that urb_cat::sday is significant